<?php	
	// Interface function	
	function oh_module_jquery($tokens) {
		global $oh_object_jquery;
		$count	 = count($tokens); 
		$default = $oh_object_jquery->urls['jquery'];
		if ($count > 0) {
			if ($count == 1) {
				$token 	= $tokens[0];
				$url 	= isset($oh_object_jquery->urls[$token]) ? $oh_object_jquery->urls[$token] : $default;
				return '<script type="text/javascript" src="'.$url.'"></script>'."\n";				
			}
		}
		return '<script type="text/javascript" src="'.$default.'"></script>'."\n";	
	} 

	// Option file required
	//require_once($oh['path']."/modules/mysql/ezsql/shared/ez_sql_core.php");
	//require_once($oh['path']."/modules/mysql/ezsql/mysql/ez_sql_mysql.php");
	
	// Main class of module
	class oh_class_jquery {	
		public $urls;
		function oh_class_jquery() {
			$this->urls = array(
				'jquery' 		=> oh("url.framework.modules.jquery.js")."/jquery-1.3.2.min.js",
				'ui-core' 		=> oh("url.framework.modules.jquery.js")."/ui.core.js",
				'ui-draggable' 	=> oh("url.framework.modules.jquery.js")."/ui.draggable.js",
			);
		}
	}
	
	// Main object of module
	global $oh_object_jquery;
	$oh_object_jquery = new oh_class_jquery();
?>
